Skip to content

perf: performance improvements MTT-4641 #2176#2204

Merged
jeffreyrainy merged 10 commits intodevelopfrom
perf/performance-improvements
Sep 23, 2022
Merged

perf: performance improvements MTT-4641 #2176#2204
jeffreyrainy merged 10 commits intodevelopfrom
perf/performance-improvements

Conversation

@jeffreyrainy
Copy link
Copy Markdown
Contributor

https://jira.unity3d.com/browse/MTT-4641

  • Merge if else into return
  • Merge .rotation and .position into .SetPositionAndRotation
  • Remove .ToString() call on strings
  • Use TryGetComponent to reduce garbage allocation
  • Merge .Where().Count() calls into .Count() call
  • Remove indirect gameObject call
  • Remove redundant null check
  • Use native .Count instead of LINQ method
  • Use faster string comparison

Changelog

  • Fixed: Improved performance

Testing and Documentation

No functionality changed

smitdylan2001 and others added 4 commits September 1, 2022 14:40
- Merge if else into return
- Merge .rotation and .position into .SetPositionAndRotation
- Remove .ToString() call on strings
- Use TryGetComponent to reduce garbage allocation
- Merge .Where().Count() calls into .Count() call
- Remove indirect gameObject call 
- Remove redundant null check
- Use native .Count instead of LINQ method
- Use faster string comparison
@jeffreyrainy jeffreyrainy marked this pull request as ready for review September 22, 2022 16:39
@jeffreyrainy jeffreyrainy requested review from a team as code owners September 22, 2022 16:39
Copy link
Copy Markdown
Contributor

@simon-lemay-unity simon-lemay-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with the change in UnityTransport. Haven't reviewed the rest.

Copy link
Copy Markdown
Contributor

@0xFA11 0xFA11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good.

@jeffreyrainy jeffreyrainy enabled auto-merge (squash) September 23, 2022 12:34
@jeffreyrainy jeffreyrainy merged commit c5dff6d into develop Sep 23, 2022
@jeffreyrainy jeffreyrainy deleted the perf/performance-improvements branch September 23, 2022 13:23
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
…y-Technologies#2204)

* Performance Improvement

- Merge if else into return
- Merge .rotation and .position into .SetPositionAndRotation
- Remove .ToString() call on strings
- Use TryGetComponent to reduce garbage allocation
- Merge .Where().Count() calls into .Count() call
- Remove indirect gameObject call 
- Remove redundant null check
- Use native .Count instead of LINQ method
- Use faster string comparison

* style: adjusting to code standards

Co-authored-by: smitdylan2001 <dylan.smit01@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants